import pytest
import requests
from send.Send import Send
from utils.read_yaml import read_yaml


class Test_bankcard_add:

    @pytest.mark.parametrize( "args", read_yaml("D:/Projects/接口自动化/data/bankcard_add.yaml") )
    def  test_bankcard_add(self,args):

        se =  Send()
        login_username = args["username"]
        session = se.ceshi_buy_login(login_username)
        exp = args["exp"]

        result = se.send_bankcard_add(session,args)

        assert result["code"] == 200 and result["body"]["code"] == exp